* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #4A5568 0%, #5FCF80 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 480px;
    padding: 40px;
    animation: slideIn 0.5s ease;
}

@@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

    .logo-section img {
        max-width: 280px;
        margin-bottom: 20px;
    }

    .logo-section h1 {
        color: #4A5568;
        font-size: 26px;
        margin-bottom: 8px;
    }

    .logo-section p {
        color: #5FCF80;
        font-style: italic;
        font-weight: 600;
        font-size: 15px;
    }

.welcome-text {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;
}

.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #5FCF80, transparent);
    margin: 25px 0;
}

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        color: #4A5568;
        font-weight: 600;
        margin-bottom: 8px;
        font-size: 14px;
    }

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #666;
    z-index: 1;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

    .form-group input:focus,
    .form-group select:focus {
        outline: none;
        border-color: #5FCF80;
        box-shadow: 0 0 0 4px rgba(95, 207, 128, 0.1);
    }

.phone-input-group {
    display: flex;
    gap: 10px;
}

.country-code-wrapper {
    width: 130px;
    position: relative;
}

.country-code {
    width: 100%;
    padding: 14px 14px 14px 35px;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.country-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    z-index: 1;
}

.phone-number-wrapper {
    flex: 1;
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px;
    color: #999;
    user-select: none;
    z-index: 2;
}

    .toggle-password:hover {
        color: #666;
    }

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

    .remember-me input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
        accent-color: #5FCF80;
    }

.forgot-password {
    color: #5FCF80;
    text-decoration: none;
    font-weight: 600;
}

    .forgot-password:hover {
        text-decoration: underline;
    }

.btn-login {
    width: 100%;
    padding: 15px;
    background: #5FCF80;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .btn-login:hover {
        background: #4aba6d;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(95, 207, 128, 0.4);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    .btn-login:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
    }

.divider-text {
    text-align: center;
    margin: 15px 0;
    position: relative;
    color: #999;
    font-size: 13px;
}

    .divider-text::before,
    .divider-text::after {
        content: '';
        position: absolute;
        top: 50%;
        width: 40%;
        height: 1px;
        background: #e0e0e0;
    }

    .divider-text::before {
        left: 0;
    }

    .divider-text::after {
        right: 0;
    }

.register-section {
    text-align: center;
    margin-top: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

    .register-section p {
        color: #666;
        font-size: 14px;
        margin-bottom: 10px;
    }

.btn-register {
    display: inline-block;
    padding: 10px 30px;
    background: white;
    color: #4A5568;
    border: 2px solid #4A5568;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

    .btn-register:hover {
        background: #4A5568;
        color: white;
    }

.error-message {
    background: #fee;
    border-left: 4px solid #f44;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    display: none;
}

    .error-message p {
        color: #c33;
        font-size: 14px;
        margin: 0;
    }

    .error-message.show {
        display: block;
        animation: shake 0.5s;
    }

@@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.success-message {
    background: #e8f5e9;
    border-left: 4px solid #5FCF80;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    display: none;
}

    .success-message p {
        color: #2e7d32;
        font-size: 14px;
        margin: 0;
    }

    .success-message.show {
        display: block;
        animation: fadeIn 0.5s;
    }

@@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.admin-link {
    text-align: center;
    margin-top: 15px;
}

    .admin-link a {
        color: #999;
        text-decoration: none;
        font-size: 13px;
    }

        .admin-link a:hover {
            color: #5FCF80;
        }

/* Responsive */
@@media (max-width: 576px) {
    .login-container {
        padding: 30px 20px;
    }

    .logo-section img {
        max-width: 240px;
    }

    .phone-input-group {
        flex-direction: column;
    }

    .country-code-wrapper {
        width: 100%;
    }

    .remember-forgot {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* validacion de entrada */
.form-group input.invalid,
.form-group select.invalid {
    border-color: #f44;
}

.form-group input.valid,
.form-group select.valid {
    border-color: #5FCF80;
}

.helper-text {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

    .helper-text.error {
        color: #f44;
    }

.alternative-access {
    text-align: center;
    margin-top: 10px;
    padding-bottom: 20px;
}

.btn-user-access {
    display: inline-block;
    padding: 10px 30px;
    background: #5FCF80;
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

    .btn-user-access:hover {
        background: #4aba6d;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(95, 207, 128, 0.4);
    }
